var btn = document.getElementById("button");
btn.onclick = function(){
    var username = document.getElementById("username").value;
    var password = document.getElementById("password").value;

    $.ajax({
        type:"get",
        url:"https://6711b0190998bf2d4dc54271.hz-iframe-svc.simplelab.cn/login",
        data:{
            uname:username,
            upwd:password
        },
        success:function(msg){
            //console.log(msg)
            if(msg.code==200){
                alert("登录成功")
                window.location.href = "http://127.0.0.1:5500/webpack/src/index1.html"
            }else{
                alert("登录失败")
            }
        }
    })
}